package cn.itcast.controller;

import cn.itcast.domain.Customer;
import cn.itcast.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
@RequestMapping("/customer")
public class CustomerController {
    @Resource
    private UserService service;

    @RequestMapping("/findCustomerByName.do")
    @ResponseBody
    public Customer findCustomerByName(String name){
        Customer customer=service.findCustomer(name);
        return customer;
    }

}
